package com.mymoney.ws.data;

import java.io.Serializable;
import java.sql.Timestamp;

import com.google.gson.annotations.SerializedName;


public class ItemBean implements Serializable {

	private static final long serialVersionUID = -8608962037145434939L;

	@SerializedName("id")
	private Integer id;
	
	@SerializedName("name")
	private String name = null;
	
	@SerializedName("store")
	private StoreBean store = null;
	
	@SerializedName("category")
	private CategoryBean category = null;
	
	@SerializedName("price")
	private double price;
	
	@SerializedName("planDate")
	private Timestamp planDate = null;
	
	@SerializedName("buyDate")
	private Timestamp buyDate = null;
	
	@SerializedName("currency")
	private CurrencyBean currency = null;
	
	@SerializedName("isBought")
	private int isBought;
	
	@SerializedName("primaryAccount")
	private String primaryAccount = null;
	
	@SerializedName("code")
	private long code = 0;
	

	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}

	
	public StoreBean getStore() {
		return store;
	}


	public void setStore(StoreBean store) {
		this.store = store;
	}


	public CategoryBean getCategory() {
		return category;
	}


	public void setCategory(CategoryBean category) {
		this.category = category;
	}


	public double getPrice() {
		return price;
	}


	public void setPrice(double price) {
		this.price = price;
	}


	public CurrencyBean getCurrency() {
		return currency;
	}


	public void setCurrency(CurrencyBean currency) {
		this.currency = currency;
	}
	
	
	public int isBought() {
		return isBought;
	}


	public void setBought(int isBought) {
		this.isBought = isBought;
	}
	
	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}

	public Timestamp getPlanDate() {
		return planDate;
	}


	public void setPlanDate(Timestamp planDate) {
		this.planDate = planDate;
	}


	public Timestamp getBuyDate() {
		return buyDate;
	}


	public void setBuyDate(Timestamp buyDate) {
		this.buyDate = buyDate;
	}

	@Override
	public boolean equals(Object obj) {

		if (obj == null) {
			return false;
		}

		if(this == obj) {
			return true;
		}

		if (!(obj instanceof ItemBean)) {
			return false;
		}

		ItemBean other = (ItemBean) obj;
		if ((id == null) || (other.getId() == null)) {
			return false;
		}

		return (id.equals(other.getId()));
	}


	public String getPrimaryAccount() {
		return primaryAccount;
	}


	public void setPrimaryAccount(String primaryAccount) {
		this.primaryAccount = primaryAccount;
	}


	public long getCode() {
		return code;
	}


	public void setCode(long code) {
		this.code = code;
	}
}
